GIF

The Transparent/Interlaced GIF Resource Page

Rated Top 5% Linked at Main Street Earth Featured on AOL's Web Diner Netscape enhanced

*** Version 2.52 (March 21, 1996) ***

This document resides at http://dragon.jpl.nasa.gov/~adam/transparent.html


The Highlight

Have you seen animated GIF images on the Web? They don't require server push/pull or CGI programming, and they're very efficient. Multiple frames in a single image is just a part of the GIF89a spec that Netscape has implemented in version 2.0. I haven't put together a nice section on it yet, but here's my compilation of related Usenet postings, which should help you get a start on GIF animation.


Contents

  1. Disavowal of Originality (aka: Standing On the Shoulders of Giants)
  2. Introduction
  3. Tools by Platform:

    DOS/Windows


    Mac


    Unix


    Online


  4. Programming (C)
  5. Further References

Disavowal of Originality

Actually this document is not the first of its kind. Check out some of the other pages that have already been devoted to the subject: And other Web pages that include related information: They don't seem to mention interlacing, though, so perhaps there's a raison d'etre ("raisin of summer") for this page after all.

Introduction

Wondering what transparent or interlaced GIFs are?

A transparent GIF is an image that has a certain bit set on one of its colormap entries, so that a Web browser's background will show through wherever that color appears in the image. The GIF image at the top of this page is really rectangular, but the image background around the blob is set to be transparent, so that the page background shows through. (If you don't see this, you are experiencing Netscape bug #3 in my unofficial bug list. Try reloading the page.)

An interlaced GIF, instead of being transmitted and displayed top-to-bottom like a normal image, is first displayed at its full size with a very low resolution, then at a higher resolution, until it finally attains a normal appearance. The GIF image at the top of this page is interlaced, and you can watch the image load progressively in several passes (unless your browser caches it and just redisplays it in a single pass). After initially being enchanted by interlacing, I have come to regard it as a useless and annoying trick in most cases -- interlaced images take longer to redisplay, and interlacing combined with transparency tends to bring out bugs in Netscape -- but it may still have its uses.

See also Thomas Boutell's WWW FAQ. Transparency is supported on almost all graphical browsers, while interlacing may not be on some; however, it has no ill effects (or any effects whatsoever) on those that do not support it.

Return to table of contents

Tools by Platform


DOS / Windows

General:

These utilities, as well as nearly any other free/shareware programs for PCs, are archived at the SimTel mirror sites. If you have trouble with any of these links, try one of the other SimTel mirrors, in a directory something like "win3/graphics".

There is a beautifully done page on working with GIFs at the Guide to Digital Pictures & More. It may be slow loading for US users, but you may find it worth it.

Transparent Images:

For DOS, I refer you to The Transparent Images page, which gives a cookbook method for using the "giftrans" utility listed below.

Interlaced Images: Both Transparent and Interlaced Images:

Return to table of contents


Macintosh

General:

Virtually all Mac free/shareware is distributed from the Info-Mac FTP site, including most of the programs listed below. Since this site is overloaded, some of the links below point instead to one of its mirror sites, uiarchive.cso.uiuc.edu. If you still have trouble with any of the following links, or if you are not located in the US, try another Info-Mac mirror site, in a directory something like "/pub/info-mac/_Graphic_&_Sound_Tool/_Graphic". There is also a concentration of graphics utilities and file specs for the two GIF formats (for programmers) at U. Texas, which seems to have a partial mirror of the Info-Mac archives.

You will find a very attractive and complete cookbook on creating T/I GIFs at Stephen Collins' Web66 Cookbook page (under "A More Appetizing Presentation"), which also includes recipes for all other aspects of Web server administration. This site maintains local copies of the binaries for all of the required software (listed below), which saves you the hassle of trying to get them from the usual overcrowded FTP sites.

There is a beautifully done page on working with GIFs at the Guide to Digital Pictures & More. It may be slow loading for US users, but you may find it worth it.

Transparent images:

Interlaced Images: Both Transparent and Interlaced Images:

Return to table of contents


Unix

General:

All of the more common X11 applications are archived at the central FTP distribution site, under the "contrib" or "R5contrib" directories. Several of the programs listed below are referenced to this site, but if you have trouble with the links, try the mirror at Sunsite or one of the other mirrors.

NOTE TO SILICON GRAPHICS USERS: SGI machines come standard with a graphic utility called "imgworks" that handles both transparency and interlacing, so you need not bother with any of this software.

Transparent images:

The Transparent Images page is (once again) the place to look, with a nice tutorial to walk you through the process (this is Unix, after all, so instead of menus and buttons it is a process). But if you just want links to the tools themselves:

Interlaced Images:

Both Transparent and Interlaced Images:

Return to table of contents


Online (Platform-Independent)

If you really groove on doing things across the net, you can actually exchange your old worn-out GIFs for shiny new T/I GIFs online, using some smart Web pages. However, note that you probably need to be running an HTTPD server on your computer in order to use these services; they generally ask you for the URL of an image, and then open their own connection as a client to your server, fetch the image by HTTP, and manipulate it.

Transparent Images:

Both Transparent and Interlaced Images:

Return to table of contents

Programming (C)

Programmers, take heart! Thomas Boutell's GD is a C graphics manipulation library that provides calls for performing all sorts of operations on GIF images, including transparency and interlacing. You might also be interested in the GD InTerpreter, GDIT, for Unix or 32-bit Windows.

File specs for GIF87a and GIF89a can be had at U. Texas archives.

Return to table of contents

Further References

I have compiled a brief list of commonly observed bugs involving transparency and interlacing, which may save you from knocking yourself out trying to fix a problem that is inherent to your browser.

The best resource in the universe for tricky problems with Web graphics is the Usenet newsgroup comp.infosystems.www.authoring.images. Make sure your news host is defined in your browser's preferences in order to access any newsgroup.

You all might want to check out Bryan Woodworth's WWW Graphics Page, (shut down "until further notice" as of Feb. 10, 1996) which is muy bueno for all kinds of graphics stuff (it has links to a lot of the sites I've mentioned, and much, much more).

For pointers to archives of downloadable GIFs, try Yahoo, or get the compressed tar file of graphics (~375 GIFs) from Stanford's archives.

For imagemap info, NCSA has a general tutorial aimed primarily at Unix users, Joseph Walker has a more complete introduction to the topic and list of resources, and the WWW FAQ has a list of imagemap-making programs for various platforms. There's also a very friendly Imagemap Help Page from the folks at Hiway Technologies.

NOTE: You may rest assured that I am happy -- no, more than that, ecstatic -- to help you with any remaining questions or related issues, but before you send me email, PLEASE do me (and yourself) a favor and look first at the WWW FAQ, which in all likelyhood has the answer to your question. It'll be faster for you, and easier for me. Thank you too much.

Speaking of FAQ's: Where, you may ask, could you get any other FAQs, if you so desired? You could FTP to MIT archives or University of Lyon archives which contain archives by newsgroup of every FAQ there is, or you could use the Usenet FAQ Web page at Ohio State, which includes all FAQs posted in the news.answers group. For a complete FAQ reference (finding them, writing them, falling in love all over again with them), see Infinite Ink's comprehensive page on the subject.

Return to table of contents


Additions and corrections to this document are welcome.
Adam Bernstein / adam@dragon.jpl.nasa.gov
You can send me Email.